package cn.edu.ctbu.datajpacrud.repository;

import cn.edu.ctbu.datajpacrud.domain.Teacher;
        import org.springframework.data.domain.Page;
        import org.springframework.data.jpa.repository.JpaRepository;
        import org.springframework.data.jpa.repository.Query;

        import java.awt.print.Pageable;
        import java.util.List;

public interface TeacherRepository extends JpaRepository<Teacher,Integer> {



    @Query("select u from tb_teacher u where no=(select max(no) from tb_teacher t)")
    Teacher getTeacherMaxNo();
    List<Teacher> findByNameLike(String name);

    List<Teacher> findByNameAndSex(String name, String sex);
    List<Teacher> findByNameAndPassword(String name, String password);
}